package com.atguigu.yygh.cmn.config;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author mengWu
 * @Date 2021年05月09日 21:39
 * 在启动类上添加@MapperScan注解，功能一致
 */
@Configuration
@MapperScan("com.atguigu.yygh.cmn.mapper")
public class CmnConfig {
    /**
     *
     * @author mengWu
     * @date 2021/5/12 11:05
     * @return com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor
     * 分页插件
     */
    @Bean
    public PaginationInterceptor paginationInterceptor(){
        return new PaginationInterceptor();
    }
}
